# 计算传⼊的字符串中数字，字⺟，空格，以及其他的个数
def func(s):
    digit_number = 0
    al_number = 0
    space_number = 0
    others_number = 0
    for i in s:
        if i.isdigit():
            digit_number += 1
        elif i.isalpha():
            al_number += 1
        elif i.isspace():
            space_number += 1
        else:
            others_number += 1
    return (digit_number, al_number, space_number, others_number)

print(func("1223 sddad ddda"))







